<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>hover</title>
    <style>
        .box{
            top: 150px;
            position: relative;
            width: 200px;
            background-color: #000000;
        }
        .box .active{
            display: none;
        }
        .box:hover .active{
            position: absolute;
            display: inline-block;
            top: -30px;
            left: 50%;
            transform: translate(0, -50%);
            border: 1px solid pink;
        }
        input{
            display: block;
            width: 100%;
        }
        input:hover{
            content: attr(title);
        }
        p{
            top: 120px;
            position: absolute;
        }
    </style>
</head>
<body>
    <p>wowoowowoow</p>
<div class="box">
    <p class="active">hahah</p>
    <input type="text" value="hahah" title="hahahhhhhhh" data-content="哈哈哈哈哈哈">
</div>
</body>
</html>
